package jmine.tec.batch.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Version;

import jmine.tec.persist.Versioned;
import bancosys.tec.persist.bussobj.PersistableBusinessObject;

@Entity
public class MyElement extends PersistableBusinessObject implements Versioned {

    private Long id;

    private Long version = 0L;

    /**
     * @return the id
     */
    @Id
    public Long getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Version para lock otimista da carteira.
     * 
     * @return the version
     */
    @Version
    @Column(name = "VERSION")
    public Long getVersion() {
        return this.version;
    }

    /**
     * @param version the version to set
     */
    public void setVersion(Long version) {
        this.version = version;
    }

}
